<template>
<div>
  <div>我们要学习setup函数了</div>
  <div>{{obj}}  {{str}}</div>
</div>
</template>

<script>
export default {
  setup() {
   console.log('setup')
   console.log(this)
   const obj = {
    name: '曹扬',
    age: 16
   }
   const str =  '她在装嫩,老妖婆'
   return {
    obj,
    str
   }
  },
  beforeCreate() {
    console.log('beforeCreate')
    console.log(this)
  }
}
</script>
